package pkmn.move;

import java.util.ArrayList;
import java.util.List;
import pkmn.battle.BattlePokemon;
import pkmn.status.BattleStatus;
import pkmn.status.BattleStatusEnum;
import pkmn.util.Util;

public class Free extends IndirectAction {

    @Override
    public void execute(BattlePokemon battlePokemon) {

        List listOfStatus = battlePokemon.getBattleStatus();
        for (BattleStatus bs : new ArrayList<BattleStatus>(listOfStatus)) {
            if (bs.equals(BattleStatusEnum.wrap)) {
                Util.printAndWait(battlePokemon + " was freed of Wrap!");
                listOfStatus.remove(bs);
            } else if (bs.equals(BattleStatusEnum.seed)) {
                Util.printAndWait(battlePokemon + " was freed of Leech Seed!");
                listOfStatus.remove(bs);
            }
        }
    }
    /*
    Status removed by Rapid Spin
    -Bind
    -Clamp
    -Fire Spin
    -Leech Seed
    -Magma Storm
    -Sand Tomb
    -Spikes
    -Stealth Rock
    -Toxic Spikes
    -Whirlpool
    -Wrap
     */
}
